<template>
  <div class="app">
    <div class="status-bar" :style="{height:statusBarHeight + 'px'}"></div>
    <navbar class="navbar" :style="{backgroundColor: 'white' }">
      <navbar-item type="left" @click="backClick">
        <div v-if="back">
          <text class="iconLeft" >&#xe659;</text>
        </div>
      </navbar-item>
      <navbar-item type="title" >
        <text class="text">{{title}}</text>
      </navbar-item>
      <navbar-item type="right" @click="toReward" >
        <div >
          <text class="iconRight">京小东记录</text>
        </div>
      </navbar-item>
    </navbar>
  </div>
</template>

<script>

export default {
  name: "paymentNavbar.vue",
  data(){
    return{
      statusBarHeight: eeui.getStatusBarHeightPx(),
    }
  },
  created() {
    this.initIconFont()
  },
  props:{
    title:String,
    back:{
      default:true,
    }
  },
  methods:{
    backClick(){
      if(this.back){
        eeui.closePage()
      }

    },
    toReward(){
       if (this.getGlobalData().token == null) {
                eeui.toast('请先登录')
                return;
              }
      eeui.openPage({
        url: 'root://pages/member/transferSystem/rewardRecord.js',
        statusBarType: 'immersion',
        statusBarStyle: false
      })
    }
  }
}
</script>

<style scoped>
.navbar {
  width: 750px;
  height: 100px;
  /*border-bottom-color:gray;*/
  /*border-bottom-width: 1px;*/
  /*border-bottom-style: solid;*/
}
.text {
  font-size: 36px;
  color: black;
}
.status-bar {
  background-color: white;
}
.iconLeft{
  color: black;
  font-size: 30px;
  padding-left: 30px;
  padding-right: 30px;
  font-family: iconfont2;
}
.iconRight{
  color: lightgrey;
  font-size: 28px;
  padding-left: 30px;
  padding-right: 30px;
  /*font-weight: bold;*/
  font-family: iconfont2;
}
.app{
  background: #FF6766;
  position: relative;
}
.navbar_top_background{
  position: absolute;
  width: 750px;
  height: 80px;
  background: #FF6766;

}
</style>






